﻿using BCEntity.CRM.BigCustomerDriver;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace BCData.CRM.BigCustomerDriver
{
    public interface IBigCustomerDriverData
    {
        /// <summary>
        /// 删除大客户专属司机
        /// </summary>
        /// <param name="bigCustomerDriverId">大客户专属司机Id</param>
        /// <returns></returns>
        Task<bool> DeleteAsync(long bigCustomerDriverId);
        /// <summary>
        /// 获取大客户专属司机
        /// </summary>
        /// <param name="bigCustomerDriverId">大客户专属司机Id</param>
        /// <returns></returns>
        Task<BigCustomerDriverEntity> GetEntityAsync(long bigCustomerDriverId);

        /// <summary>
        ///获取大客户专属司机列表 
        /// </summary>
        /// <param name="companyId">公司Id</param>
        /// <param name="bigCustomerId">大客户Id</param>
        /// <param name="driverName">司机名称</param>
        /// <param name="driverPhone">司机电话</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">页行数</param>
        /// <returns></returns>
        Task<(IEnumerable<BigCustomerDriverEntity>, int)> GetListAsync(int? companyId, long? bigCustomerId, string driverName, string driverPhone, int pageIndex, int pageSize);

        /// <summary>
        /// 添加大客户专属司机
        /// </summary>
        /// <param name="entity">大客户专属司机模型</param>
        /// <returns></returns>
        Task<BigCustomerDriverEntity> InsertAsync(BigCustomerDriverEntity entity);
        /// <summary>
        /// 修改大客户专属司机
        /// </summary>
        /// <param name="entity">大客户专属司机模型</param>
        /// <returns></returns>
        Task<BigCustomerDriverEntity> UpdateAsync(BigCustomerDriverEntity entity);

        /// <summary>
        /// 获取大客户专属司机列表
        /// </summary>
        /// <param name="companyId">公司Id</param>
        /// <param name="bigCustomerId">大客户Id</param>
        /// <param name="dirverId">司机Id</param>
        /// <returns></returns>
        Task<IEnumerable<BigCustomerDriverEntity>> GetOnlyList(int? companyId, long? bigCustomerId, long? dirverId);
    }
}